package com.web709.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
//需要数据表
@Data
@ApiModel(value = "积分记录实体类")
public class PointsAccounts {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private int id;

    @TableField(value = "volunteer_id")
    @ApiModelProperty(value = "用户id")
    private int userId;

    @ApiModelProperty("积分总数")
    private int totalPoints;

    @ApiModelProperty(value = "已兑换积分")
    private int redeemedPoints;

    @ApiModelProperty(value = "剩余积分")
    private int remainingPoints;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)//自动填充策略，在添加数据的时候自动填充
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)//自动填充策略，在添加数据和修改数据的时候自动填充
    private LocalDateTime updateTime;

}
